/*
 * Copyright (C) 2012-2013  Romain DUBOIS
 * 
 * This file is part of NeMoS - Network and Modular Software
 * 
 * NeMoS is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * NeMoS is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with NeMoS.  If not, see <http://www.gnu.org/licenses/>.
 */
package nemos.resources.impl.test;

import java.util.Collections;
import java.util.Enumeration;
import java.util.ResourceBundle;

/**
 * IntegerResources : The Integer Resources test class.
 * 
 * @author Romain DUBOIS
 */
public class IntegerResources extends ResourceBundle {

    /** The prefix */
    private final String mPrefix;
    /** The suffix */
    private final String mSuffix;

    /**
     * Constructor
     * 
     * @param pPrefix
     *            The prefix to use
     * @param pSuffix
     *            The suffix to use
     */
    public IntegerResources(final String pPrefix, final String pSuffix) {
        super();
        mPrefix = pPrefix;
        mSuffix = pSuffix;
    }

    /**
     * {@inheritDoc}
     * 
     * @see java.util.ResourceBundle#handleGetObject(java.lang.String)
     */
    @Override
    protected Object handleGetObject(final String pKey) {
        return Integer.valueOf((mPrefix + pKey + mSuffix).hashCode());
    }

    /**
     * {@inheritDoc}
     * 
     * @see java.util.ResourceBundle#getKeys()
     */
    @Override
    public Enumeration<String> getKeys() {
        return Collections.enumeration(Collections.<String> emptySet());
    }
}
